﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace EuroManager.Presentation.WebPortal.GameViewer.Models
{
    public class Clock : PresentationModel
    {
        private TimeSpan time = TimeSpan.Zero;
        private int minutes = 0;
        private int seconds = 0;

        public TimeSpan Time
        {
            get { return time; }
            set
            {
                if (time != value)
                {
                    time = value;
                    RaisePropertyChanged("Time");
                    Minutes = (int)time.TotalMinutes;
                    Seconds = time.Seconds;
                }
            }
        }

        public int Minutes
        {
            get { return minutes; }
            private set
            {
                if (minutes != value)
                {
                    minutes = value;
                    RaisePropertyChanged("Minutes");
                }
            }
        }

        public int Seconds
        {
            get { return seconds; }
            private set
            {
                if (seconds != value)
                {
                    seconds = value;
                    RaisePropertyChanged("Seconds");
                }
            }
        }
    }
}
